tuples  = (1, 2, 1, 4, 5)
print(tuples.count(1))

print(tuples.index(1))
# tuples[2] = 3 错误，元组不可修改

# 元组转列表
list_tuples = list(tuples)
print(list_tuples)

#  列表转元组
tuples_list = tuple(list_tuples)
print(tuples_list)

def test():
    return 1, 2, 3 # 返回类型为元组

if __name__ == '__main__':
    print(test())
    a, b, c = test() #  元组解包,变量数要和返回数一致